using System;
using Sinacor.Infra.Common;
using System.Collections.Generic;
using Sinacor.Servico.Bovespa.Corretagem.BusinessEntity;
using Sinacor.Servico.Bovespa.Corretagem.Service.DataContract.Response;

namespace Sinacor.Servico.Bovespa.Corretagem.Service.ServiceImplementation.Translator
{
    /// <summary>
    /// Classe tradutora entre objetos BaseCalculo e BaseCalculo
    /// </summary>
    public class BaseCalculoToBaseCalculo : BaseTranslator<Sinacor.Servico.Bovespa.Corretagem.Service.DataContract.Response.BaseCalculoResponse, Sinacor.Servico.Bovespa.Corretagem.BusinessEntity.BaseCalculo, List<Sinacor.Servico.Bovespa.Corretagem.Service.DataContract.Response.BaseCalculoResponse>, List<Sinacor.Servico.Bovespa.Corretagem.BusinessEntity.BaseCalculo>>
    {
        public override Sinacor.Servico.Bovespa.Corretagem.Service.DataContract.Response.BaseCalculoResponse Translate(Sinacor.Servico.Bovespa.Corretagem.BusinessEntity.BaseCalculo from)
        {
            Sinacor.Servico.Bovespa.Corretagem.Service.DataContract.Response.BaseCalculoResponse to = new Sinacor.Servico.Bovespa.Corretagem.Service.DataContract.Response.BaseCalculoResponse();
            to.Codigo = from.Codigo;
            to.Descricao = from.Descricao;
            to.TipoBaseCalculo = Sinacor.Infra.Service.Common.EnumConverter.Parse<DataContract.Enum.TipoBaseCalculo>(Sinacor.Infra.Service.Common.EnumConverter.ToString<BusinessEntity.Enum.TipoBaseCalculo>(from.TipoBaseCalculo));

            return to;
        }



    }
}

